package com.yanqu.road.server.cmd.cross.config;

import com.yanqu.road.entity.servercenter.ServerInfo;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.ServerGroupMgr;
import com.yanqu.road.server.manger.ServerListMgr;
import com.yanqu.road.server.manger.cross.CrossDataMgr;
import com.yanqu.road.server.manger.player.GameChatControlMgr;
import com.yanqu.road.server.manger.rank.RankMgr;
import com.yanqu.road.server.protocol.Protocol;


@Cmd(code = Protocol.S_CHAT_CONTROL_DATA_RELOAD_FROM_CROSS, desc = "跨服分组reload通知")
public class ChatControlReloadNotifyCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		ServerInfo serverInfo = ServerListMgr.getServerInfo(GameServer.getInstance().getServerId());
		GameChatControlMgr.reloadChatControl(serverInfo.getChannelId());
		GameChatControlMgr.syncOnlineUser();
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
